import { getWorkByStatus } from "@/api/taskmanage/work";
import { getAllByDepartment } from "@/api/system/user";

var workData = [{}];
var userData = [{}]

const taskTypeData = [
  { value: 0, label: "需求", type: "success" },
  { value: 1, label: "BUG", type: "danger" },
  { value: 2, label: "优化", type: "primary" },
  { value: 3, label: "测试", type: "warning" },
];
const statusData = [
  { value: 0, label: "待处理" },
  { value: 1, label: "处理中" },
  { value: 2, label: "已完成" },
  { value: 3, label: "待商讨" },
];

getWorkByStatus().then((res) => {
  workData = res.data;
});
getAllByDepartment().then((res) => {
  userData = res.data.map((e: any) => {
    return {
      value: e.userName,
      label: e.userTrueName,
    };
  });
});
export { workData, userData, taskTypeData, statusData };
